#!/bin/sh
version=1.1.3

docker build -t scshyzh-bss:${version} .

docker tag scshyzh-bss:${version} 192.168.50.149:88/scshyzh/scshyzh-bss:${version}

docker push 192.168.50.149:88/scshyzh/scshyzh-bss:${version}


curl -X PUT \
    -H "content-type: application/json" \
    -H "Cookie: KuboardUsername=admin; KuboardAccessKey=rcrw8ykrr2xb.zppcrwrx75imp57efd84x2c2exy2r7ba" \
    -d '{"kind":"deployments","namespace":"scshyzh-cloud","name":"scshyzh-bss","images":{"192.168.50.149:88/scshyzh/scshyzh-bss":"192.168.50.149:88/scshyzh/scshyzh-bss:'${version}'"}}' \
    "http://192.168.50.131:30080/kuboard-api/cluster/default/kind/CICDApi/admin/resource/updateImageTag"